import request from '@/utils/request'

export function findAllUser(val) {
  return request({
    url: '/user/findAllEnable/' + val,
    method: 'get'
  })
}

export function deleteUser(data) {
  return request({
    url: 'user/modifyStatus',
    method: 'post',
    data: {
      ids: data
    }
  })
}

export function findByCondition(val, search) {
  return request({
    url: 'user/findByCondition/' + val,
    method: 'get',
    params: {
      account: search
    }
  })
}

export function updateUserByAdmin(data) {
  return request({
    url: 'user/update',
    method: 'put',
    data
  })
}

export function addUser(data) {
  return request({
    url: 'user/add',
    method: 'post',
    data
  })
}
